Leveling mechanism